package com.whut.producer.pojo;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import lombok.Data;

/**
 * @author WZH
 * @create 2021-08-27 10:07
 * @desc 温度数据
 **/

public class Data_WD {
    private String time;
    private double value;
    private String sensorId;

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public double getValue() {
        return value;
    }

    public void setValue(double value) {
        this.value = value;
    }

    public String getSensorId() {
        return sensorId;
    }

    public void setSensorId(String sensorId) {
        this.sensorId = sensorId;
    }

    public Data_WD(String time, double value, String sensorId) {
        this.time = time;
        this.value = value;
        this.sensorId = sensorId;
    }

    /*
    *  重写toString方法
    * */
    @Override
    public String toString() {
            return JSON.toJSONString(this , SerializerFeature.WriteNullStringAsEmpty  );
    }
}
